Skip to content

Detect containerd image store for multi-arch builds and add Podman manifest support#12597

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/detect-containerd-image-store
Closed

Detect containerd image store for multi-arch builds and add Podman manifest support#12597
Copilot wants to merge 4 commits intomainfrom
copilot/detect-containerd-image-store

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

Multi-arch container builds require containerd image store (Docker) or manifest support (Podman). Without detection, builds silently fail or produce incorrect results when users request multiple platforms.

Changes

New API

  • Added Task<bool> SupportsMultiArchAsync() to IContainerRuntime

Docker detection

  • Executes docker info --format json and parses for containerd image store configuration
  • Checks DriverStatus for "Image store": "containerd" or Driver == "containerd"
  • Logs warning with enablement instructions when not configured

Podman multi-arch

  • Detects support via podman manifest --help
  • Creates manifest for multi-platform builds: podman manifest create <name>
  • Passes --manifest <name> to build command
  • Cleans up manifest after build

Build orchestration

  • ResourceContainerImageBuilder checks runtime support before multi-platform builds
  • Falls back to linux/amd64 when multi-arch unavailable
  • Logs actionable warnings with configuration guidance

Example warning output

warn: Multi-platform build requested but Docker does not support multi-arch builds.
      Defaulting to linux/amd64 platform. Enable containerd image store in Docker Desktop
      settings under 'Features in development' > 'Use containerd for pulling and storing images'.
      See https://docs.docker.com/engine/storage/containerd/

Fixes #12133

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • centralus.data.mcr.microsoft.com
    • Triggering command: dotnet publish /home/REDACTED/work/aspire/aspire/tests/testproject/TestProject.ServiceA/TestProject.ServiceA.csproj --configuration Release /t:PublishContainer /p:ContainerRepository=servicea (dns block)
    • Triggering command: dotnet publish /home/REDACTED/work/aspire/aspire/tests/testproject/TestProject.ServiceA/TestProject.ServiceA.csproj --configuration Release /t:PublishContainer /p:ContainerRepository=servicea /p:ContainerArchiveOutputPath=/tmp/test-output /p:ContainerImageFormat=OCI /p:ContainerRuntimeIdentifier=linux-x64 (dns block)
    • Triggering command: buildkitd --allow-insecure-entitlement=network.host (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Detect if containerd image store is used for multi-arch builds</issue_title>
<issue_description>Multi-arch builds with Docker require that containerd is configured as the image store. We should detect if this is configured and warn the user if it is not.

  • We can detect if containerd is enabled by running docker info --format json and checking the driver-type property.
  • Users can enable containerd via the desktop app. There is a way to automate this by editing config and we might be able to provide an aspire do prepare-docker command to help get this config in place.
  • We should warn the user if the container runtime is not configured for multi-arch builds and commence using LinuxAmd64 as the default.
  • There should be a new API on IContainerRuntime that is CheckIfSupportsMultiArch to detect this.
  • Update the code for PodmanContainerRuntime to support calling podman manifest create {imagename} and passing the manifest to the podman build command.</issue_description>

Comments on the Issue (you are @copilot in this section)

@davidfowl We also need to handle this for podman. The IContainerRuntime implementation should expose an API that the IResourceContainerImageBuilder can use to default the type platforms we support.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits November 1, 2025 18:20
Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
Copilot AI changed the title [WIP] Add detection for containerd image store in multi-arch builds Detect containerd image store for multi-arch builds and add Podman manifest support Nov 1, 2025
Copilot AI requested a review from captainsafia November 1, 2025 18:36
@davidfowl
Copy link
Member

This will be the 13.1 fix, for 13, we'll do #12596

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12597

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12597"

@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Jan 14, 2026
@sebastienros sebastienros deleted the copilot/detect-containerd-image-store branch January 15, 2026 16:32
@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

3 participants

Comments